package com.gill.ioc.circularDependency;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * 结论：对于prototype类型的bean的循环依赖，无论是构造器注入还是setter方式注入，spring都不支持
 * 对于singleton类型的bean的循环依赖，spring只支持setter方式注入来解决循环依赖，构造器注入仍然会出错
 */
@Repository
public class BoyFriend {
	@Autowired
	private GirlFriend girlFriend;

//	@Autowired
//	public BoyFriend(GirlFriend girlFriend) {
//		this.girlFriend = girlFriend;
//	}
}
